# Maintainer: Luca Weiss <luca@z3ntu.xyz>
pkgname=py3-sparqlwrapper
_pkgname=sparqlwrapper
pkgver=1.8.5
pkgrel=0
pkgdesc="SPARQL Endpoint interface to Python"
url="https://rdflib.github.io/sparqlwrapper/"
arch="noarch"
license="W3C"
checkdepends="bash py3-nose"
makedepends="py3-setuptools"
source="$pkgname-$pkgver.tar.gz::https://github.com/RDFLib/sparqlwrapper/archive/$pkgver.tar.gz"
builddir="$srcdir/$_pkgname-$pkgver"

build() {
	python3 setup.py build
}

check() {
	# Tests soft-fail because of the missing rdflib-jsonld dependency.
	# This dependency had its last release in 2016 and is apparently not
	# compatible with Python 3.
	# py3-rdflib should also be a dep but that would cause a circular
	# dependency loop.
	./run_tests_py3.sh
}

package() {
	python3 setup.py install --prefix=/usr --root="$pkgdir"
}

sha512sums="7637989bbf883824be5d277d6b0bd2c2ec8b628ded8a103f6da724b62977a5e9bd13f8ec8d9031de5f5028acfcbd599148dbab5ff3694261c1ec27295c34ee38  py3-sparqlwrapper-1.8.5.tar.gz"
